package cn.acup.boot.scheduler;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class SchedulerTask {

    private int count=0;
    
    /**
     * delay 1 second to get wechat access token
     * per 115 minutes to reload
     */
	@Scheduled(initialDelay = 1000, fixedDelay = 6900 * 1000 )
    private void processToken(){
		if( count == 0 ){
			System.out.println("first time ! this is scheduler task runing  "+(count++));
		}else{
			System.out.println("fives second : this is scheduler task runing  "+(count++));
		}
    }
    
}